package org.jeecg.modules.demo.weixin.smtsplitordercom.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.weixin.entity.SmtSplitOrderCom;
import org.jeecg.modules.demo.weixin.smtsplitordercom.mapper.SmtSplitOrderComMapper;
import org.jeecg.modules.demo.weixin.smtsplitordercom.service.ISmtSplitOrderComService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;

/**
 * @Description: 订单接收方记录
 * @Author: jeecg-boot
 * @Date: 2023-12-23
 * @Version: V1.0
 */
@Service
public class SmtSplitOrderComServiceImpl extends ServiceImpl<SmtSplitOrderComMapper, SmtSplitOrderCom> implements ISmtSplitOrderComService {


    @Override
    public List<SmtSplitOrderCom>  querySplitPrice(String merId,String startTime, String endTime) {

        LambdaQueryWrapper<SmtSplitOrderCom> wrapper = new LambdaQueryWrapper<>();
        wrapper.apply("DATE(create_time) <= '" + endTime + "'");
        wrapper.apply("DATE(create_time) >= '" + startTime + "'");
        wrapper.eq(SmtSplitOrderCom::getMerchantId, merId);
        List<SmtSplitOrderCom> splitOrderComs = this.list(wrapper);
        return splitOrderComs;
    }
}
